
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;
import javax.swing.JButton;


//Profe le pedi de fabor a mi compañero Cristhian que si podia subir
//mi trabajo en su mismo proyecto por motivos realmente que especiales
//Espero no se vuelva repetir esta situacion!!!


public class Interfas extends Canvas {
TextArea ta=new TextArea();
TextArea ta2=new TextArea();


//     public void paint(Graphics g) {
//try {
//
//                    Image img = null;
//                    File t1 = new File("imagenes/player.png");
//                    img = ImageIO.read(t1);
//                    g.drawImage(img, 0, 0, 100, 50, this);
//
//                } catch (Exception e) {
//                    System.out.println("error");
//                }
//
//
//
// }
    public static void main(String[] args) {
//
        //Interfas i=new Interfas();
       Frame f =new Frame("                                                                                       total video converter");
       //f.add(i);

        TextField tf1=new TextField();
        TextField tf2=new TextField();
        TextField tf3=new TextField();
        TextField tf4=new TextField();
        Label l1=new Label("Tareas");
        Label l2=new Label("Previa");
        Label l3=new Label("Carpeta destino por defecto");
        Label l4=new Label("Importar Media Files");


         f.setLayout(null);


       l1.setBounds(10, 50, 50, 20);
       f.add(l1);
       l2.setBounds(430, 50, 50, 20);
       f.add(l2);
       l3.setBounds(10, 360,180, 20);
       f.add(l3);
       l4.setBounds(120, 120,180, 20);
       f.add(l4);

       tf1.setBounds(10, 70, 400, 220);
       tf2.setBounds(430 ,70, 350, 210);
       tf3.setBounds(10 ,390, 300, 25);
       tf4.setBounds(450 ,370, 320, 5);

          f.add(tf1);
          f.add(tf2);
          f.add(tf3);
          f.add(tf4);

              tf3.setText("C:/Programs Files/Total Video Converter/Converted");

        Button b1=new Button("Nueva tarea");
        Button b2=new Button("Eliminar");
        Button b3=new Button("Convertir");
        Button b4=new Button("Avanzado");
        b1.setBounds(10, 310, 100, 30);
        f.add(b1);
        b2.setBounds(115, 310, 100, 30);
        f.add(b2);
        b3.setBounds(225, 310, 90, 30);
        f.add(b3);
        b4.setBounds(325, 310, 90, 30);
        f.add(b4);

        Button b5=new Button("||>");
        Button b6=new Button("||");
        Button b7=new Button("<");
        Button b8=new Button(">");
        Button b9=new Button("[");
        Button b10=new Button("]");
        Button b11=new Button("                ");
        b5.setBounds(440, 290, 35, 20);
        f.add(b5);
        b6.setBounds(485, 290, 35, 20);
        f.add(b6);
        b7.setBounds(530, 290, 35, 20);
        f.add(b7);
        b8.setBounds(580, 290, 35, 20);
        f.add(b8);
        b9.setBounds(625, 290, 35, 20);
        f.add(b9);
        b10.setBounds(665, 290, 35, 20);
        f.add(b10);
        b11.setBounds(710, 290, 65, 20);
        f.add(b11);

        Button b12=new Button("....");
        Button b13=new Button("Abrir");
        b12.setBounds(330, 390, 35, 30);
        f.add(b12);
        b13.setBounds(370, 390, 40, 30);
        f.add(b13);

        Button b14=new Button("Registrar");
        Button b15=new Button("Herram.");
        Button b16=new Button("Ayuda");
        Button b17=new Button("Acerca de");
        b14.setBounds(480, 390, 70, 30);
        f.add(b14);
        b15.setBounds(560, 390, 70, 30);
        f.add(b15);
        b16.setBounds(640, 390, 60, 30);
        f.add(b16);
        b17.setBounds(710, 390, 70, 30);
        f.add(b17);


        //ventana general
        f.setSize(800, 440);
        f.setLocation(200, 100);
        f.setVisible(true);


         b1.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
         Interfas in = new Interfas();
      in.ventana5();
      }
        });

         b4.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
         Interfas in = new Interfas();
      in.ventana7();
      
      }
        });

        b13.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
         Interfas i = new Interfas();
      i.ventana6();

      }
        });

        b14.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
         Interfas i = new Interfas();
      i.ventana();

      }
        });
         b15.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
         Interfas i2 = new Interfas();
      i2.ventana2();
      }
        });

 b16.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
         Interfas i3 = new Interfas();
      i3.ventana3();
      }
        });
b17.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
         Interfas i4 = new Interfas();
      i4.ventana4();
      }
        });

        f.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e){
            System.exit(0);
        }
        });
    }
    

public void ventana (){
 final Frame f=new Frame("Registrar producto");
Panel p7= new Panel();
Panel p8= new Panel();
Panel p9= new Panel();
Panel p10= new Panel();

TextField tfv=new TextField("",20);

Label l=new Label("Registrar total video converter");
tfv.setText("0802-2347-1287-7643");


p8.add(l);
f.add(p7);
p7.setLayout(new GridLayout(3, 1));
p7.add(p8);
p7.add(p9);
p7.add(p10);

p8.add(ta);
 JButton b18=new JButton("Seguir probando");
 JButton b19=new JButton("Comprar");
 p9.add(b18);
 p9.add(b19);

 JButton b20=new JButton("ok");
 p10.add(tfv);
 p10.add(b20);

f.setSize(500, 500);
f.setVisible(true);
f.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e){
            f.dispose();
        }
        });
        b20.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {

      ta.setText("0802-2347-1287-7643");
      }
        });

}

public void ventana2(){
    final Frame f2=new Frame("Herramienta");
    Choice ch= new Choice();

            ch.add("iniciar media burner");
            ch.add("iniciar media player");
            ch.add("herramientas avanadas");
            ch.add("lenguaje");

    f2.add(ch);
    f2.setSize(250, 50);
    f2.setLocation(650, 470);
    f2.setVisible(true);

    f2.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e){
            f2.dispose();
        }
        });
}

public void ventana3(){
    final Frame f3=new Frame("Ayuda y sopore tecnico");
   TextArea ta= new TextArea();
    Label l1= new Label("The topics in this section provide ");
    Label l2= new Label("some basic information about Total");
    Label l3= new Label("Video Converter, what it is for and ");
    Label l4= new Label("what you can do with it");
    Label l5= new Label("How to get started");

    f3.setLayout(null);

        ta.setBounds(0, 10, 300, 300);
         l1.setBounds(10, 30, 800, 20);
         f3.add(l1);
         l2.setBounds(10, 50, 800, 20);
         f3.add(l2);
         l3.setBounds(10, 70, 800, 20);
         f3.add(l3);
         l4.setBounds(10, 90, 800, 20);
         f3.add(l4);
         f3.add(ta);
         l5.setBounds(10, 110, 800, 20);
         f3.add(l5);

    f3.setSize(300, 300);
    f3.setVisible(true);
    f3.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e){
            f3.dispose();
        }
        });

}
public void ventana4(){
    final Frame f4=new Frame("Informacion acerca de total_video_converter");

    Label l1= new Label("E.M Total Video Converter version 3.61");
    Label l2= new Label("Cpirigth(c) 2004-210");
    Label l3= new Label("pagina wep   //http www.efematix.com ");
    Label l4= new Label("soporte   //http www.efematix_soporte.com ");
    Label l5= new Label("soporte   //http www.efematix_soporte/total vide.com");

    f4.setLayout(null);

         l1.setBounds(10, 30, 800, 20);
         f4.add(l1);
         l2.setBounds(10, 50, 800, 20);
         f4.add(l2);
         l3.setBounds(10, 150, 800, 20);
         f4.add(l3);
         l4.setBounds(10, 170, 800, 20);
         f4.add(l4);
         l5.setBounds(10, 190, 800, 20);
         f4.add(l5);

    f4.setSize(300, 300);
    f4.setVisible(true);
    f4.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e){
            f4.dispose();
        }
        });
}
       public void ventana5(){
    final Frame f5=new Frame("Nueva tarea");
    Choice ch= new Choice();
            ch.add("Importar ficheros multimedia");
            ch.add("Descargar videos flash");
            ch.add("Video editor");
            ch.add("Importar fotos (fotos -> video)");
            ch.add("Capturar escritorio");
            ch.add("Copia de un disco");
            ch.add("Copiar un CD de audio");
            ch.add("Herramientas avanzadas");
    f5.add(ch);
    f5.setSize(250, 50);
    f5.setLocation(80,390);
    f5.setVisible(true);
    f5.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e){
            f5.dispose();
        }
        });
}
       public void ventana6(){
    final Frame f2=new Frame("Abrir");
    Menu m1=new Menu("Organizar");
    Menu m2=new Menu("Incluir en biblioteca");
    Menu m3=new Menu("Incluir con");

    MenuBar mb1= new MenuBar();
      MenuBar mb2= new MenuBar();
        MenuBar mb3= new MenuBar();
    MenuItem mi1=new MenuItem("cortar");
    MenuItem mi2=new MenuItem("copiar");
    MenuItem mi3=new MenuItem("pegar");
    MenuItem mi4=new MenuItem("deshaser");
    MenuItem mi5=new MenuItem("opciones de carpeta");
    MenuItem mi6=new MenuItem("cerrar");
//_____________________________________
    MenuItem mi7=new MenuItem("documentos");
    MenuItem mi8=new MenuItem("imagenes");
    MenuItem mi9=new MenuItem("musica");
    MenuItem mi10=new MenuItem("videos");

    mb1.add(m1);
    m1.add(mi1);
    m1.add(mi2);
    m1.add(mi3);
    m1.add(mi4);
    m1.add(mi5);
    m1.add(mi6);
    f2.setMenuBar(mb1);



    f2.setSize(500, 300);
    f2.setVisible(true);

    f2.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e){
            f2.dispose();
        }
        });

}
public void ventana7(){
    final Frame f5=new Frame("avanzado");


Panel p7= new Panel();
Panel p8= new Panel();
//Panel p9= new Panel();
Panel p10= new Panel();

TextField tfv=new TextField("",30);

Label l=new Label("Sencillo");
tfv.setText("/Programs Files/Total Video Converter/Converted");


p8.add(l);
f5.add(p7);
p7.setLayout(new GridLayout(3, 1));
p7.add(p8);

p7.add(p10);

p8.add(ta);

 JButton b20=new JButton("ok");
 p10.add(tfv);
 p10.add(b20);
    f5.setSize(500, 300);
    f5.setVisible(true);
    f5.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e){
            f5.dispose();
        }
        });
        b20.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {

      ta.setText("Programs Files/Total Video Converter/Converted");
      }
        });
}
}
